package com.example.demo.mapper;

import com.example.demo.entity.Book;
import com.example.demo.entity.BookVO;
import com.example.demo.entity.Quanxian;
import com.example.demo.entity.QuanxianVo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface QuanMapper {
    //查询分页
    List<Quanxian> getpage5(QuanxianVo quanxianVo);
    //查询总条数
    Integer getcount5(QuanxianVo quanxianVo);
    //批量删除
    Integer Bydelete5(Integer[] id);
    //查询权限表
    @Select("select * from p_quanxian")
    List<Quanxian> getquan(Quanxian quanxian);
    //添加权限表
    @Insert("INSERT INTO p_quanxian (rolename, details) " +
            "VALUES (#{rolename},  #{details})")
    @Options(useGeneratedKeys = true, keyProperty = "id" , keyColumn = "id")
    public Integer insert5(Quanxian quanxian);
}
